import pool from '../../pool';

export const localeAction = {
    name: 'locale',
    getLocale: (): string => {
        const localeState = pool.getState();
        return localeState.locale.locale || '';
    },
    setLocale: (locale: string): void => {
        pool.dispatch({
            type: 'SET_LOCALE',
            payload: locale,
        });
    },
};
